using System;
using System.Collections.Generic;
using System.Text;

using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;
using System.Drawing.Design;
using System.Collections;
using System.Windows.Forms;

namespace Adoor.VSDesigner.CollectionEditor
{
    internal class PropertyGridSite : ISite, IServiceProvider
    {
        public PropertyGridSite(IServiceProvider sp, IComponent comp)
        {
            this.sp = sp;
            this.comp = comp;
        }

        public object GetService(Type t)
        {
            if (this.sp != null)
            {
                return this.sp.GetService(t);
            }
            return null;
        }


        public IComponent Component
        {
            get
            {
                return this.comp;
            }
        }
        public IContainer Container
        {
            get
            {
                return null;
            }
        }
        public bool DesignMode
        {
            get
            {
                return false;
            }
        }
        public string Name
        {
            get
            {
                return null;
            }
            set
            {
            }
        }

        private IComponent comp;
        private IServiceProvider sp;
    }

}
